<?php

use Phalcon\Validation,
    Phalcon\Validation\Validator\PresenceOf,
    Phalcon\Validation\Validator\Email;

class Step1Validation extends Validation
{
    public function initialize()
    {   

        $this->setFilters('fname','trim');
        $this->setFilters('mname','trim');
        $this->setFilters('lname','trim');

    
        $this->add('fname', new PresenceOf(array(
            'message' => 'The firstname is required'
        )));

        $this->add('lname', new PresenceOf(array(
            'message' => 'The lastname is required'
        )));

        $this->add('gender', new PresenceOf(array(
            'message' => 'The gender is required'
        )));


        $this->add('bdate', new PresenceOf(array(
            'message' => 'The birthdate is required'
        )));

        $this->add('username', new PresenceOf(array(
            'message' => 'The username is required'
        )));

    }
}